#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<string>

using namespace std;

vector<string> splitWordsBySeparator(vector<string>& words, char sepaqrator) {
    vector<string> res;
    for (int i = 0; i < words.size(); i++)
    {
        words[i] += separator;
        int prev = 0;
        string s;
        for (auto c : words[i])
        {
            if (c != separator)
                s += c;
            else
            {
                if (!s.empty())
                {
                    res.push_back(s);
                    s.clear();
                }
            }
        }
    }
    return res;
}

int main()
{
    vector<string> vv = { "one.two.three" ,"four.five" ,"six" };
    splitWordsBySeparator(vv, '.');
    return 0;
}